package com.qq.nacos.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

@RefreshScope//自动刷新配置
@Configuration
@Data
public class NacosConfig {

    @Value("${user.name}")
    private String name;

    @Value("${user.age}")
    private String age;

    @Value("${user.sex}")
    private String sex;

}
